package Dao;

import POJO.TbUser;
import org.apache.ibatis.annotations.Many;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

public interface UserMapper {
    @Select("select * from tbuser where id=#{id2}")
    @Results({@Result(id = true,column = "id",property = "id"),@Result(column = "name",property = "name"),@Result(column = "address",property = "address"),@Result(column = "   id",property ="orders",many=@Many(select = "Dao.OrdersMapper.selectOrder"))})
    TbUser selectById(int id);
}
